﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace db_de
{
    public partial class loading : Form
    {
        int length = 0;
        int load_time = 1000;//ms
        public loading()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void loading_Load(object sender, EventArgs e)
        {
            
            timer1.Interval = load_time / 100;
            timer1.Start();
           
        }

        private void progressBar1_Click(object sender, EventArgs e)
        {

        }
        
        private void timer1_Tick(object sender, EventArgs e)
        {

            progressBar1.Value=length++;
            if(length ==100)
            {
                progressBar1.Value = 0;
                timer1.Stop();
                Login l = new Login();
                this.Hide();
                l.ShowDialog();
                this.Dispose();
              
            }
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}
